<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        let arr = [1, 2, 3];
        arr.forEach(iteam => {
            console.log(iteam);
        })
        console.log("forEach之后输出");

        setTimeout(() => {
            console.log("setTimeout异步回调函数");
        }, 0);
        console.log("在settimeout之后的代码");




        try {

            console.log(a);

        } catch ( error) {
            console.log(error);
        }

        console.log("继续运行了");
    </script>
</body>

</html>